$(function(){
	$(".rightall").css("height",$(document.body).height() - 90 +"px");
	$(".leftall").css("height",$(document.body).height() - 90 +"px");
	var errorMsg = $("[name='errorMsg']").val();
	if(errorMsg != null && errorMsg != "") alert(errorMsg);
});

//$(window).resize(function(){
//	$(".rightall").css("height",$(document.body).height() - 90 +"px");
//	$(".leftall").css("height",$(document.body).height() - 90 +"px");
//});

function close(contanier){
	contanier.style.display="none";
	return false;
}
function open(contanier){
	contanier.style.display="block";
	return false;
}

function closeById(id){
	$(id).css("display","none");
	return false;
}
function openById(id){
	$(id).css("display","block");
	return false;
}

function sendValue(me,send,get){
	var v = $(me).siblings(send).val();
	$(get).text(v);
	$(get).val(v);
}

function sendValueToAttr(me,send,get,attr){
	$(get).attr(attr,$(me).siblings(send).val());
}

function clearValue(name){
	$(name).text("");
	$(name).val("");
}

function clearValueToAttr(name,attr){
	$(name).attr(attr,"");
}

function aler(msg){
	return confirm(msg);
}


//显示查看与编辑 虞艳 入党管理
function yy(msg,url,ele){ 
	var v = $(ele).attr("value");
	var r = $(ele).attr("requiredValue");
	if(confirm(msg)){
		if(r == null || r == ""){
			$.get("cadre/"+url+"?"+v,function(data,status){
				var i = data.indexOf("forword:");
				if (i != -1) {//根据返回值进行跳转
					var url = data.substring("forword:".length);
					window.location.href = "/TMS"+url;
					return;
			    }
			});
		}else{
			$.get("cadre/"+url+"?"+v+"&"+r,function(data,status){
				console.log(data);
				var i = data.indexOf("forword:");
				if (i != -1) {//根据返回值进行跳转
					var url = data.substring("forword:".length);
					window.location.href = "/TMS"+url;
					return;
			    }
			});
		}
	};
}
